#ifndef CASE_H
#define CASE_H

#include <QWidget>

class Case : public QWidget
{
    Q_OBJECT
public:
    explicit Case(QWidget *parent = nullptr);

protected:
    void paintEvent(QPaintEvent* ev);
    void timerEvent(QTimerEvent* ev);
    void mousePressEvent(QMouseEvent* ev);
    void mouseMoveEvent(QMouseEvent* ev);
    void enterEvent(QEvent *ev);
    void flutter(int min = 10, int max = 30); // 图像颤动函数

private:
    QPixmap _pixmap; // 显示图片
    int _index; // 用于循环更换图片
    QPoint _point; // 距离

signals:

};

#endif // CASE_H
